<?php
class PublicControl extends Control {
	public function index(){
		if(isset($_SESSION['relname'])){
			$relname=$_SESSION['relname'];
		}else{
			$relname='游客';
		}
		$cate=new CategoryModel();
		$cateName=$cate->selcate();
		$this->view->assign('cateName',$cateName);
		$this->view->assign('relname',$relname);
		
		$article=new ArticleModel();
		$artData=$article->selfooter(1);
		$artData=footer($artData);
		
		$singleArt=$article->selfooter(3);
		$this->view->assign('artData',$artData);
		$this->view->assign('singleArt',$singleArt);
		
	}
}
?>